import request from '../util/axios'
import qs from 'qs'

export function  getMeetingList(currPage,pageSize){

    return request({
        url:'/meeting/getMeetingList',
        method: 'post',
        headers:{
            'content-type':'application/json;charset=UTF-8'
        },
        data:{
            currPage:currPage,
            pageSize:pageSize
        }
    })
}


export function  getFreeMeeting(data){
    return request({
        url:'/meeting/getFreeMeeting',
        method: 'post',
        headers:{
            'content-type':'application/json;charset=UTF-8'
        },
        data:data
    })
}


/*
* 添加会议室信息
* */
export function  addMeeting(data){
    return request({
        url:'/meeting/addMeeting',
        method: 'post',
        headers:{
            'content-type':'application/x-www-form-urlencoded'
        },
        data:qs.stringify(data)
    })
}

/*
* 修改会议室信息
* */
export function  updateMeeting(data){
    return request({
        url:'/meeting/updateMeeting',
        method: 'post',
        headers:{
            'content-type':'application/x-www-form-urlencoded'
        },
        data:qs.stringify(data)
    })
}

/*
* 删除会议室信息
* */
export function  deleteMeetingById(id){
    return request({
        url:'/meeting/deleteMeetingById',
        method: 'get',
        params:{
            meetingId:id
        }
    })
}

